Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not ship unit tests in released packages #8308

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

mikehardy
Copy link
Collaborator

@mikehardy mikehardy commented Feb 9, 2025

Description

While test-integrating the patch set from #8307 I noticed that the patches were huge!

The functional change was miniscule though.

On investigation I discovered the patchset was huge because the unit test changes I made were showing up as diffs, because we have been shipping unit tests with our released packages for everything but functions and one other.

I made sure __tests__ was in .npmignore for all the packages (including a commit I tacked on the vertexai PR #8236) so those aren't shipped anymore and won't show up in package diffs when generating patch-package sets

While test-integrating this patch and auditing the resulting node_modules package contents I noticed 4 of the packages still shipped types tests as well. Added a second commit that ignores those

Related issues

Noticed in

Release Summary

single conventional commit, but I did set it as a "fix" which will trigger a release since it affects the release artifacts

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

The patch-package set for this should result in removing the tests directories when applied while testing it


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Feb 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2025 8:06pm

@mikehardy mikehardy added the Workflow: Needs Review Pending feedback or review from a maintainer. label Feb 9, 2025
@russellwheatley
Copy link
Member

Good catch 😅 !

@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Feb 10, 2025
@mikehardy mikehardy merged commit a870cf7 into main Feb 10, 2025
21 checks passed
@mikehardy mikehardy deleted the @mikehardy/do-not-ship-unit-tests branch February 10, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants